//
//  SEGSelectTopicTypeViewModel.h
//  Commom
//
//  Created by 梁学彰 on 2020/6/6.
//

#import <Foundation/Foundation.h>
#import "SEGSHManager.h"
#import "SEGTopicDataModel.h"
#import "ReactiveObjC.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^topicSelectBlock)(SEGTopicDataItemModel *model);

@interface SEGSelectTopicTypeViewModel : NSObject
@property (nonatomic, strong) SEGSHManager *sHManager;
@property (nonatomic, strong) SEGTopicDataModel *model;
@property (nonatomic, assign) NSInteger page;

@property (nonatomic, strong) SEGTopicDataItemModel *selectItem;

@property (nonatomic, strong) NSMutableArray <SEGTopicDataItemModel *>*dataArray;


@property (nonatomic,   copy) topicSelectBlock selectBlock;

- (instancetype)initWithSelectItem:(SEGTopicDataItemModel *)model block:(topicSelectBlock)block;


/// 获取列表数据
/// @param refresh  是否重新刷新
- (RACSignal *)sendTopicListRequestWithRefresh:(BOOL)refresh;

- (RACSignal *)selectIndex:(NSIndexPath *)index;

@end

NS_ASSUME_NONNULL_END
